//
//  LTQStatusViewModel.swift
//  WeiBoProject
//
//  Created by MAC on 16/3/2.
//  Copyright © 2016年 LTQ. All rights reserved.
//

import UIKit

class LTQStatusViewModel: NSObject {

//    ViewModel中放model
    var statusModel: LTQStatus?
    
    var verifity_image: UIImage?{
        switch statusModel?.user?.verified_type ?? -1{
        case -1: return nil
        case 0: return UIImage(named: "avatar_vip")
        case 2,3,5: return UIImage(named: "avatar_enterprise_vip")
        case 220: return UIImage(named: "avatar_grassroot")
        default: return nil
        }
    }
    
    var level_image: UIImage?{
        return UIImage(named: "common_icon_membership_level\(statusModel?.user?.mbrank ?? 0)")
    }

    var retweetString:String?{
        
        if statusModel?.reposts_count == 0{
            return "转发"
        }else{
            if let str = statusModel?.reposts_count{
                return "\(str)"
            }
            return "转发"
        }
        
    }

    //评论
    var commentString: String?
//    转发微博的内容
    var retweetStatusString: String?{
        return statusModel?.retweeted_status?.text
    }
    
}
